package com.chenbei.erp.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chenbei.common.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDate;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@Schema(description = "供应商")
@Data
@TableName("erp_supplier")
public class Supplier extends BaseEntity {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "供应商编号")
    private String code;

    @Schema(description = "公司名")
    @TableField("name")
    private String name;

    @Schema(description = "省份ID")
    @TableField("province_id")
    private Long provinceId;

    @Schema(description = "城市ID")
    @TableField("city_id")
    private Long cityId;

    @Schema(description = "地址")
    @TableField("address")
    private String address;

    @Schema(description = "联系人姓名")
    @TableField("contact_person")
    private String contactPerson;

    @Schema(description = "联系人电话")
    @TableField("contact_phone")
    private String contactPhone;

    @Schema(description = "状态[1:正常|2:合同到期|3:暂停合作|4:终止合作]")
    @TableField("status")
    private Integer status;

    @Schema(description = "结算周期[1:现结|2:月结|3:季结]")
    @TableField("settlement_deadline")
    private Integer settlementDeadline;

    @Schema(description = "级别[1:一级|2:二级|3:三级]")
    @TableField("level")
    private Integer level;

    @Schema(description = "供应商负责人ID")
    @TableField("assigned_employee_id")
    private Long assignedEmployeeId;

    @Schema(description = "供应商负责人")
    @TableField(exist = false)
    private String assignedEmployeeName;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "发票")
    @TableField(exist = false)
    private SupplierInvoice invoice;
}
